Method of decoding a variable-length codeword sequence

ABSTRACT

The present invention relates to a method of source decoding of a variable-length codeword sequence, said decoding being based on an associated codeword table. It is characterized in that it comprises the steps of:  
     creating a tree with tree-paths (T_PTH) and branches (B),  
     decoding a received sequence (SQr), said step comprising the sub-steps of:  
     extending the best tree-paths (BT_PTH) in the tree by computing first cumulative metrics (CM_LPTH) of the succeeding branches (B),  
     selecting the codewords (CWDi) corresponding to the best tree-paths (BT_PTH), and saving corresponding data in paths (PTH), the corresponding data comprising second cumulative metrics (CM_STCK),  
     reordering the saved paths (PTH) in accordance with their second cumulative metrics (CM_STCK),  
     testing a priori conditions on top path (TOP_PTH), and if they are verified, outputting said top path, or otherwise returning to the extension sub-step.

FIELD OF THE INVENTION

[0001] The present invention relates to a method of source decoding avariable-length codeword sequence, said source decoding being based onan associated codeword table. The invention also relates to a decoder,said decoder utilizing said method.

[0002] Such a method may be used in any system using variable-lengthcodes like, for example, a video or audio communication system.

BACKGROUND OF THE INVENTION

[0003] A video communication system typically comprises a sourceencoding system, a channel and a source decoding system. Said sourceencoding system generates variable-length codeword sequences andtransmits them through said channel to said source decoding system thatdecodes them by virtue of a shared code.

[0004] As there are some perturbations on the channel, a receivedcodeword sequence contains errors; hence, there is a plurality ofpossible decoded codeword sequences.

[0005] The source decoder then acts as an estimator of the receivedsequence by selecting one of the possible decoded codeword sequencesbased on a best metric between all the metrics associated with thesepossible sequences. The computation of the best metric is usually calledmetric derivation. Such an estimation is usually based either on aViterbi algorithm or on a stack algorithm, said stack algorithm beingdescribed in the reference “Buttigieg-Variable-length error-correctingcodes—PhD thesis, University of Manchester, United Kingdom, 1995”.

[0006] One major problem of such an estimation is that said estimationrequires a computation of the metric associated with each codeword ineach decoding step. Hence, the best partially decoded codeword sequenceis extended by all the codewords, i.e. all the metrics of all thecodewords are calculated, then a new best-codeword at a considered timeis chosen as a function of its metric and is extended again by all thecodewords until a number of extended codewords is equal to a receivedcodeword sequence length. This computation makes a metric derivationused in the Viterbi or stack algorithms the most costly part of decodingin terms of central processing unit (cpu) requirements.

OBJECT AND SUMMARY OF THE INVENTION

[0007] Accordingly, it is an object of the invention to provide a methodand a decoder of source decoding a variable-length codeword sequence,said source decoding being based on an associated codeword table, whichachieves an efficient decoding for a reasonable cpu cost, time andcomplexity.

[0008] To this end, there is provided a method of decodingvariable-length codeword sequences as defined in claim 1.

[0009] In addition, there is provided a source decoder for decodingvariable-length codeword sequences as defined in claim 12.

[0010] As we will see in detail in the further description, such amethod has the great advantage that the codewords are selected in anincreasing order of their metric value. Thus, by searching only usefulcodewords, the proposed method is very efficient in terms of CPU cost,complexity and time, because the other codewords are not taken intoaccount anymore.

[0011] It is another object of the invention to further decrease thedecoding in terms of complexity and rapidity.

[0012] Accordingly, in a first preferred embodiment, each codeword has alength, and the tree comprises a number of levels equal to the maximumcodeword length defined in the codeword table. As the number of levelswithin the tree has a reasonable value, it leads rapidly to a resultwithout having to use too many computations.

[0013] In a second preferred embodiment, the extension sub-stepcomprises a stop metric computation conditions test, such that, if saidconditions are verified, the extension is stopped and is followed by thesub-step of reordering paths, the stop metric computation conditionstest being based on a comparison of the first cumulative metric of thebest tree-path with the worst saved path's second cumulative metric.Thus, it allows extension of only the useful best tree-paths, andconsequently examination of only the useful associated codewords.

[0014] Moreover, in a third preferred embodiment, if a priori conditionsare based on symbols criteria, the selection sub-step is adapted toselect only a codeword, which has a length different from all previouslyselected codeword lengths within a decoding step. Thus, we avoidexamining codewords, which are worse than those already selected.

[0015] In a fourth preferred embodiment, the decoding step furthercomprises a sub-step of testing end conditions on the top path beforetesting the a priori conditions, such that, if said top path verifiesend conditions, the sub-step of testing the a priori conditions isperformed, or otherwise a sub-step of testing stop decoding conditionsis performed, and if said stop decoding conditions are not verified, areturn to the extension step takes place. The end conditions allowtesting whether we have reached a possible result, which has somecharacteristics equal to those of the received sequence.

[0016] In a preferred embodiment, these characteristics are the lengthof the received codeword sequence, which is the number of bits withinthe received codeword sequence. Hence, the corresponding data in pathsfurther comprising a cumulative number of bits, and the end conditionsare based on a comparison of the top path's cumulative number of bitswith the length of the received codeword sequence.

[0017] In another preferred embodiment, the stop decoding conditions arebased on an incrementation of a decoding step counter and on acomparison of said counter with a set threshold, such that if saidcounter exceeds said threshold, the decoding is stopped. Thus, it avoidstaking too much time to look for a result for a decoded sequence, whichresult may not exist or take an unreasonable time to find.

BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Additional objects, features and advantages of the invention willbecome apparent upon reading the following detailed description and uponreference to the accompanying drawings in which:

[0019]FIG. 1 illustrates a communication system model comprising anencoder and a decoder according to the invention,

[0020]FIG. 2 is a codeword table associated with the variable-lengthcodeword sequences decoder of FIG. 1,

[0021]FIG. 3 is a representation of a code tree associated with thecodeword table of FIG. 2,

[0022]FIG. 4 is a first state diagram showing a metric derivationcomputation used by the variable-length codeword sequences decoder ofFIG. 1,

[0023]FIG. 5a is a second state diagram showing variable code sequenceestimation used by the variable-length codeword sequences decoder ofFIG. 1,

[0024]FIG. 5b is the following of the second state diagram showingvariable code sequence estimation used by the variable-length codewordsequences decoder of FIG. 1,

[0025]FIG. 6 is a graph showing a first performance of the methodaccording to the invention illustrated in FIG. 1 compared with othermethods,

[0026]FIG. 7 is a graph showing a second performance of the methodaccording to the invention illustrated in FIG. 1 compared with othermethods, and

[0027]FIG. 8 is a graph showing a third performance of the methodaccording to the invention illustrated in FIG. 1 compared with othermethods, and

[0028]FIG. 9 is a graph showing complexity results of the methodaccording to the invention illustrated in FIG. 1 compared with othermethods.

[0029]FIG. 10 is a graph showing rapidity results of the methodaccording to the invention illustrated in FIG. 1 compared with othermethods.

DETAILED DESCRIPTION OF THE INVENTION

[0030] In the following description, well-known functions orconstructions known to a person skilled in the art are not described indetail since they would obscure the invention in unnecessary detail.

[0031] The present invention relates to a method of source decoding avariable-length codeword sequence based on an associated codeword tablealso usually called Huffman code. Said method is used in particular in aVariable-Length-Code decoder called VLC decoder as shown in FIG. 1within a video communication system VS. Besides, said videocommunication system VS comprises a source encoding system S-ENCcomprising a VLC encoder VLC-ENC, a channel CH and a source decodingsystem S-DEC comprising said VLC decoder VLC_DEC. The source encodingsystem S-ENC encodes a symbol sequence to a codeword sequence SQ via theVLC encoder and transmits it through said channel CH during a pluralityof bit times to said source decoding system S-DEC which decodes it viathe VLC decoder VLC-DEC by virtue of a shared code C defined in thecodeword table. The transmission is made bit by bit.

[0032] A codeword sequence SQ has a variable length L_SQ. This meansthat the sent codeword sequences SQs may have different lengths; hence,the received codeword sequences SQr, which are received by the decodingsystem S_DEC, may have different lengths. A codeword-sequence SQcomprises a plurality of symbols S that are defined through the sharedcode C. Note that one symbol S comprises at least one bit.

[0033] An example of a codeword table is given in FIG. 2. The sharedcode C is defined as follows. A codeword CWDi is associated with asymbol Si, a codeword CWDi having a length LTHi. A value of a codewordCWDi also represents the value that may be taken by the associatedsymbol Si. Besides, a probability of appearance Pi is associated witheach codeword CWDi.

[0034] Thus, with such a shared code C, a sent codeword sequence SQs isdefined as follows. For instance, SQs=100 0 110. This codeword sequencecomprises 3 symbols S3 S1 S4 and contains 7 bits. Then, after a step ofmodulation in the source encoding system S-ENC, for instance a BPSKmodulation, which step is well known to those skilled in the art, saidsequence is equal to SQs'=1; −1; −1; −1; 1; 1; −1. Then, because ofnoise on the channel CH, the sequence received by the source decodingsystem S_DEC is, for example, SQr=0.8−0.9−0.8−1.1 1.2−1.3.

[0035] From now on, the received sequence SQr must be decoded to recoverthe sent sequence SQs. In other words, we have to recover the symbols Sithat have been sent in said sent sequence SQs. Because of theperturbations, which lead to errors, we notice that there may be manypossible decoded codeword sequences SQd. The decoding is made by the VLCdecoder VLC_DEC, and is based on an estimation of the sequence sent SQs.

[0036] Said VLC decoder VLC_DEC comprises:

[0037] A tree-path list L_PTH, which contains a set of tree-paths T_PTH,each tree-path comprising a first cumulative metric CM_LPTH and a set ofnodes NSET, and the tree-path list contains a top tree-path which is thebest tree-path according to the cumulative metrics, and

[0038] A stack STCK, which contains a set of paths PTH, each pathcomprising data, said data comprising a second cumulative metric CM_STCKand a cumulative number of bits CBITS, and a set of symbols Si.

[0039] The first cumulative metric CM_LPTH of a tree-path is a sum ofthe branch metrics of the branches B composing said tree-path T_PTH plusan initialization cumulative metric defined hereinafter.

[0040] The second cumulative metric CM_STCK of a path is a sum of themetrics of the symbols Si composing said path PTH. As mentioned above, asymbol Si is associated with a codeword CDWi.

[0041] In order to find the correct decoded codeword sequence SQd, thedecoding method uses a tree representation of the considered codewordtable, and a metric derivation algorithm. A tree is composed of nodes Nand branches B as described hereinafter. Considering that a metric canbe associated with each branch B of the tree, the decoding methodsearches the most likely tree-path in the tree that can be used todetermine the codewords CWDi with the smallest metric at a consideredtime t. As we will see, one great advantage of the proposed method isthat codewords are selected in an increasing order of their metricvalue.

[0042] I) Metric Derivation Algorithm.

[0043] The metric derivation algorithm uses a bit-by-bit branch metricsrecursive formulation and the afore-mentioned tree representation.

[0044] A Bit-by-bit Branch Metrics Recursive Formulation

[0045] The metric computation is done in accordance with the Masseymetric (as described in the reference J. L. Massey “Variable-Lengthcodes and the Fano metric” IEEE Transactions on Information Theory,IT-18(1):196-198, January 1972) which is an approximation “Maximum APosteriori” criterion called MAP criterion, equivalent, as is well knownto those skilled in the art, to the computation of a Euclidean distancebetween a partial received sequence SQr and the partial sent sequenceSQs after modulation (in case of an Additive White and Gaussian Noise),followed by a weighting by a factor depending on the codewordprobabilities of appearance and a corrective factor logP0(y) whichapproximate the likelihood of the received sequence y, x being a sentsequence.

[0046] The formula of the metric M is: $\begin{matrix}{{{M\left( {x,y} \right)} = {{{- \log}\quad {P\left( x \middle| y \right)}} = {{{- \log}\quad {P\left( y \middle| x \right)}} - {\log \quad {P(x)}} + {\log \quad {{P0}(y)}}}}}{where}{{P0}(y)} = {{\sum\limits_{t = 0}^{nb\_ bit}{{P\left( {{x\lbrack t\rbrack} = 0} \right)}{P\left( {\left. {y\lbrack t\rbrack} \middle| {x\lbrack t\rbrack} \right. = 0} \right)}}} + {{P\left( {{x\lbrack t\rbrack} = 1} \right)}{P\left( {\left. {y\lbrack t\rbrack} \middle| {x\lbrack t\rbrack} \right. = 1} \right)}}}} & \lbrack 1\rbrack\end{matrix}$

[0047] The nb_bit is the number of bits within a sequence SQ.

[0048] Therefore, a bit by bit branch metric formulation can be writtenas: $\begin{matrix}{{M\left( {{CWDi},{y\left\lbrack {t:{t + {LTHi}}} \right\rbrack}} \right)} = {\sum\limits_{k = 0}^{{LTHi} - 1}{m\left( {{{CWDi}\lbrack k\rbrack},{y\left\lbrack {t + k} \right\rbrack}} \right)}}} & \lbrack 2\rbrack\end{matrix}$

[0049] Where m(CWDi[k],y[t+k])=logP(y[t+k]|CWDi[k])−logP(x[t+k]=CWDi[k]|x[t:t+k−1])+logP₀(Y[t+k])is a branch metric associated with an nth branch of the tree-pathcorresponding to a codeword CWDi. CWDi[k] is the kth bit of the codewordCWDi.

[0050] The term logP(y[t+k]|CWDi[k]) represents a distance, the termlogP(x[t+k]=CWDi[k]|x[t:t+k−1]) an a priori probability associated withthe kth bit of the codeword CWDi and logP0(y[t+k]) a corrective factor.

[0051] Tree Representation of the Codeword Table

[0052] Such a tree comprises a plurality of:

[0053] nodes N, a plurality of nodes corresponding to a possiblecodeword CWDi;

[0054] branches B, a metric being associated with a branch B. A branch Bis composed of two nodes N, in other words, from a node N, one or twobranches can be created, a “left” branch and a “right” branch; a branchhas an associated bit value 0 or 1;

[0055] tree-paths T_PTH, a tree-path T_PTH representing a decodedcodeword sequence SQd. A tree-path T_PTH comprises a plurality ofbranches B and goes from an initial node N00 to a possible symbol Si.

[0056] Besides, a tree has different levels, the first one being thelevel 0, and a tree comprises an initial node N00.

[0057] Computation of a Metric

[0058] In the metric derivation algorithm, we examine the tree-paths inthe tree, leaving from the initial node N00 and follow them until onetree-path reaches a symbol S. A list of previously examined tree-pathsis kept in storage. A list entry contains the last node of the examinedtree-path along with its first cumulative metric i.e. a sum of thebranch metrics of branches composing this tree-path. Each decoding stepleads to an extension of the top tree-path in the tree-path list (thatis the best tree-path having the smallest cumulative metric) bycomputing the branch metrics of the succeeded branches of its last node(one or two by construction) and then adding it to the first cumulativemetric of the top tree-path to form successors. The top tree-path isthen deleted from the tree-path list and its successors are inserted.When the top tree-path in the list corresponds to a complete codewordCWDi, this codeword is added to a list of main best codewords CWD_LIST.The operation is repeated until stop conditions are verified.

[0059] Thus, the metric derivation algorithm performs the followingsteps, as shown in FIG. 4.

[0060] In a 1^(st) step CREAT_TREE), we create a tree associated withthe codeword table. We create the tree by defining relations betweennodes N computing the a priori probabilitylogP(x[t+k]=CWDi[k]|x[t:t+k−1]), as described in the reference “L.Guivarch, Carlach, Siohan—Joint Source Channel soft decoding ofHuffrnann codes with turbo-codes. In Proceedings of the Data compressionConference DCC'00 pages 83-91, Snowbird, Utah, USA, March 2000”,associated with each branch B. Note that in a preferred embodiment, thenumber of levels of a tree is equal to the maximum codeword length LTHidefined in the codeword table, i.e. here it is 4.

[0061] In a 2^(nd) step INIT_L_PTH), we initialize the tree-path listL_PTH by placing the initial node N00 with metric 0 in the top tree-pathlist L_PTH.

[0062] In a 3^(rd) step EXT_BEST_TPTH), we compute the metric of thesucceeding branches of the best tree-path BT_PTH in the tree-path listL_PTH. We delete the best tree-path BT_PTH from the tree-path listL_PTH, and insert the extended tree-paths T_PTH in the tree-path list.

[0063] In a 4^(th) step SEL_BEST_TPTH), we select the new best tree-pathBT_PTH i.e. the tree-path of the tree-path list L_PTH that has thesmallest first cumulative metric.

[0064] In a 5^(th) step STOP_METRIC_COND), we test some stop metriccomputation conditions. If one of the stop conditions is verified, westop, otherwise we continue to the 6^(th) step.

[0065] Several stop conditions can be defined. In preferred embodiments,the following stop conditions can be verified.

[0066] If each node N has been examined, we stop.

[0067] If a sufficient number of codewords CWDi has been selected, westop.

[0068] If the first cumulative metric CM_LPTH corresponding to the besttree-path exceeds a certain threshold, which is here the worst secondcumulative metric CM_STCK, we stop. This last condition is preferablyused.

[0069] In a 6^(th) step), we test whether the best tree-path BT_PTHcorresponds to a complete codeword CWDi. If yes, we continue to the7^(th) step. Otherwise, we return to the 3^(rd) step.

[0070] In a 7^(th) step), we add to the codeword list CWD_LIST the foundcodeword CWDi, corresponding to the best tree-path BT_PTH and return tothe 4^(th) step.

[0071] Note that it is possible that some codewords CWDi found will notbe used by the estimation method, in particular, if several codewordsCWDi of equal length (number of bits within the codeword) are selectedi.e. when some a priori conditions are-based on symbol criteria as willbe described below.

[0072] II) Decoding Method or VLC Algorithm

[0073] Now we will see how the decoding method, also calledTREE-VLC-STACK algorithm, uses this metric derivation algorithm byperforming the following steps, as shown in FIGS. 5a and 5 b.

[0074] In a 1^(st) step CREAT_TREE), we create the tree associated withthe codewords table as mentioned above. The tree is illustrated in FIG.3. Here, its number of levels is equal to 4.

[0075] After having created the associated tree, in a 2^(nd) sub-stepINIT_STCK), we initialize the stack STCK by putting a zero metric in thetop entry of said stack STCK and by putting infinite metric in otherentries.

[0076] In a 3rd sub-step INIT_L_PTH), we initialize the tree-path listL-PTH by placing the initial node N00 with the initialization cumulativemetric being the top path's second cumulative metric CM_STCK of thestack STCK.

[0077] In a 4th sub-step EXT_BEST_T_PTH), we extend the tree-paths T_PTHfrom the best tree-path BT_PTH, and we compute the first cumulativemetric CM_LPTH of the succeeding branches B. Then, we delete the besttree-path in the tree-path list L_PTH and insert the extended tree-pathsin said tree-path list L_PTH.

[0078] In a 5^(th) sub-step SEL_BEST_TPTH), we select the new besttree-path BT_PTH i.e. the tree-path which has the best first cumulativemetric CM_LPTH i.e. the smallest cumulative metric, in the tree-pathlist L_PTH.

[0079] In a 6^(th) sub-step SEL_CWD), If from the last pass by the step3, at least one selected best tree-path BT_PTH was a codeword, go tostep 10. If not, go to step 7.

[0080] In a 7^(th) sub-step=CWD), we test if the best tree-path BT_PTHcorresponds to a complete codeword CWDi. Thus, if the best tree-pathBT_PTH corresponds to a complete codeword, we delete the best tree-pathBT_PTH from the tree-path list L_PTH, then we go to step 8, otherwise wereturn to step 4.

[0081] Note that in the case the a priori conditions are based on symbolcriteria, we preferably test whether this corresponding completecodeword CWDi has a length LTHi different from all of the previouslyselected codeword lengths from the last pass by the step 3.

[0082] If it has an equal length, we delete the best tree-path BT_PTHfrom the tree-path list L_PTH, then we return to step 5. It means thatthis codeword CWDi is not worth being examined, as it has been selectedafter another, which has the same length, it is worse than this othercodeword. Hence, this test has the advantage of gaining time.

[0083] If it has a different length, we delete the best tree-path BT_PTHfrom the tree-path list L_PTH, then we go to step 8.

[0084] In an 8^(th) sub-step DEL_TOPTH_STCK), we delete the top pathTOP_PTH from the stack STCK.

[0085] In a 9^(th) sub-step INS_PTH_STCK), we insert the new path PTHformed from the best extended path, in the stack STCK, by selecting thecodeword CWDi obtained in step 7. Then we return to step 5.

[0086] In a 10^(th) sub-step CM_LPTH>CM_STCK), we test the stop metriccomputation conditions. Thus, we compare the first cumulative metric ofthe best tree-path with the worst saved path's cumulative metric. Hence,if the first cumulative metric CM_LPTH of the best tree-path BT_PTH inthe tree-path list L_PTH exceeds the second cumulative metric CM_STCK ofthe worst path PTH in the stack STCK, we go to step 14. It means thatthe first cumulative metric of the best tree-path BT_PTH is worse thanthe second cumulative metric of the worst path PTH. Otherwise, go tostep 11.

[0087] In an 11^(th) sub-step=CWD), if the best tree-path BT_PTH in thetree-path list L_PTH corresponds to a complete codeword CWDi, we deletethe best tree-path BT_PTH from the tree-path list L_PTH, then wecontinue to step 12. Otherwise, we return to step 4, i.e. we continue tolook for a corresponding codeword CWDi.

[0088] In a 12^(th) sub-step DEL_WORSPTH_STCK), we delete the worst pathPTH in the stack STCK, i.e.; the path which has the greatest cumulativemetric.

[0089] In a 13^(th) sub-step INS_PTH_STCK), we insert in the stack STCKthe new path PTH formed from the extended best path, in the stack STCK,by the selected codeword CWDi obtained at step 11, then we return tostep 5.

[0090] In a 14^(th) sub-step REORD_STCK), we reorder the stack STCKaccording to the second cumulative metrics values CM_STCK from the bestto the worse.

[0091] In a 15^(th) sub-step CBITS=L_SQ), we test end conditions on toppath. Thus, we compare the top path's cumulative number of bits with thelength of the received codeword sequence. If the top path's cumulativebits CBITS is equal to the received sequence SQr length L_SQ, wecontinue to step 16. Otherwise, we go to step 18.

[0092] In a 16^(th) sub-step AP_COND), we test if the top path TOP_PTHin the stack STCK verifies a priori conditions on the emitted sequence.

[0093] The a priori conditions are preferably the number of symbols Sior the number of blocks within a sequence. In this example, the a prioriconditions are the number of symbols Si. If it does verify the a prioriconditions, we stop, and we output said top path TOP_PTH, which is thedecoded solution to the received sequence SQs. Otherwise, we go to step17.

[0094] In a 17^(th) sub-step DEL_TOPTH_STCK), we delete the top-path PTHfrom the stack STCK, and put infinite metric in the top path's entry ofthe stack STCK, then we go to step 14.

[0095] In an 18^(th) sub-step STOP_COND), we test the stop decodingconditions. Thus, we increment a counter CPT corresponding to a numberof decoding steps, and we compare said counter CPT with a set thresholdTH. If said counter CPT exceeds a given threshold TH, the decoding isstopped. It means that no solution has been found. For example, thethreshold TH is set to 3*the number of bits in the sent sequence SQs.Otherwise, we return to step 3.

[0096] III) Illustrated Example

[0097] 1st Step: Creation of the Tree

[0098] Such a tree is illustrated in FIG. 3. In this Figure, the treeassociated with the codeword table of FIG. 2 has 6 symbols S1 to S6, 11nodes N00 to N40 and 10 branches. It has a first node N00. For example,it has a tree-path N00-N11-N20-S3 which is composed of the threeintermediate nodes N00-N11-N20 forming the symbol S3, said nodes beingequivalent to 3 branches B1(N00-N11), B2(N11-N20), B3(N20, N30). The 3branches have the associated bit values “1”, “0”, and “0”, respectively.

[0099] Note that we represent a node Nk1 with indexes with k=level ofthe tree. For example, N20 means that this node is at the second levelof the tree.

[0100] Step 2: initialization of the stack STCK. Here, the stack has 2paths PTH: PTH1 and PTH2. CM_STCK CBITS STAT 0 0 0 PTH1 ∞ PTH2

[0101] Step 3: initialization of the tree-path list L_PTH. CM_LPTH NSET0 N00 T_PTH00

[0102] Step 4: extension

[0103] Hence, we have two extended tree-paths: T_PTH10 and T_PTH11.CM_LPTH NSET M10 N00 − N10 T_PTH10 M11 N00 − N11 T_PTH11

[0104] Step 5: In the example, the best tree-path is the tree-pathBT_PTH=T_PTH11 (N00-N11).

[0105] Step 6: There was not any codeword selected before. Hence, we goto step 7

[0106] Step 7: Here, the best tree-path BT_PTH=T_PTH11 (N00-N11) doesnot correspond to any codeword, thus, we return to step 4.

[0107] Step 4: we have two extended tree-paths T_PTH20 TPTH21 CM_LPTHNSET M10 N00 − N10 T_PTH10 M11 + M20 N00 − N11 − N20 T_PTH20 M11 + M21N00 − N11 − N21 T_PTH21

[0108] Step 5: The new best tree-path is BT_PTH=T_PTH20.

[0109] Step 6: There was not any codeword selected before. Hence, we goto step 7.

[0110] Step 7: Here, the best tree-path BT_PTH=T_PTH20 (N00-N11-N20)does not correspond to any codeword, thus, we return to step 4.

[0111] Step 4: CM_LPTH NSET M10 N00 − N10 T_PTH10 M11 + M21 N00 − N11 −N21 T_PTH21 M11 + M20 + M30 N00 − N11 − N20 − N30 T_PTH30 M11 + M20 +M31 N00 − N11 − N20 − N31 T_PTH31

[0112] Step 5: We arrive at a best tree-path BT_PTH=T_PTH30 with a firstcumulative metric M11+M20+M30.

[0113] Step 6: From the last pass by the step 3, no selected besttree-path BT_PTH was a codeword, we go to step 7.

[0114] Step 7: as the best tree-path BT_PTH=T_PTH30 corresponds to acomplete codeword 100, we delete the best tree-path BT_PTH=T_PTH30 fromthe tree-path list, then we go to step 8.

[0115] Step 8: delete top path TOP_PTH=PTH1 in the stack STCK.

[0116] Step 9: We insert the new path PTH by selecting the codeword CWDiobtained at step 7. Said codeword CWDi comprises 3 bits 100 andcorresponds to the symbol S3. Hence, the new path PTH1 comprises thefollowing data: the second cumulative metric M10+M20+M30, the value of 3bits, and the symbol S3. CM_STCK CBITS STAT MP1 = M11 + M20 + M30 3 S3PTH1 ∞ 0 PTH2

[0117] we return to step 5. CM_LPTH NSET M10 N00 − N10 T_PTH10 M11 + M21N00 − N11 − N21 T_PTH21 M11 + M20 + M31 N00 − N11 − N20 − N31 T_PTH31

[0118] Step 5: We select the new best tree-path BT_PTH=T_PTH10.

[0119] Step 6: At least one of the selected best tree-path BT_PTH was acodeword, thus go to step 10.

[0120] Step 10: The first cumulative metric of the best tree-pathT_PTH10 is less than second-cumulative-metric of the worst path from thestack, here, it is infinite, go to step 11

[0121] Step 11: The new best tree-path BT_PTH=T_PTH10 corresponds to anew codeword 0 and to the symbol S1, thus we delete the best tree-pathBT_PTH=T_PTH10 from the tree-path list, then we go to step 12.

[0122] Step 12: We delete the worst path from the stack.

[0123] Step 13: we insert in the stack STCK, the new path PTH byselecting the codeword obtained in step 11. Thus, in the stack STCK, wehave the path PTH2 with a second cumulative metric M10 and 1 bit and thesymbol S1, as shown hereinafter. CM_STCK CBITS STAT MP1 = M11 + M20 +M30 3 S3 PTH1 MP2 = M10 1 S1 PTH2

[0124] We return to step 5. We select the new best tree-pathBT_PTH=T_PTH31

[0125] Step 6, step 10: The first cumulative metric of the besttree-path T_PTH31 is greater than the second cumulative metric of theworst path from the stack PTH2, MP2<M11+M20+M31, thus we go to step 14.

[0126] Step 14: We reorder the stack. Here, the path PTH1 is better thanthe path PTH2.

[0127] Step 15: Here, the top path's cumulative bits CBITS is not equalto the received sequence SQr length bits. Hence, we go to step 18.

[0128] Step 18: CPT=1, return to step 3.

[0129] Step 3: The tree-path list L_PTH is erased totally. The new toptree-path T_PTH is MP1 with the node N00. CM_LPTH NSET MP1 N00 T_PTH00

[0130] Step 4: We extend the branch from the node N00. CM_LPTH NSETMP1 + M10 N00 − N10 T_PTH10 MP1 + M11 N00 − N11 T_PTH11

[0131] Step 5, step 6, and step 7: T_PH10 is the best tree-path BT_PTH,no codeword has been selected and T_PH10 corresponds to the symbol S1.We delete the best tree-path BT_PTH=T_PTH10 in the tree-path list.

[0132] Step 8: We delete the top path in the stack STCK PTH1.

[0133] Step 9: Then, in the stack STCK, we have CM_STCK CBITS STAT MP1 =MP1 + M10 4 S3 S1 PTH1 MP2 1 S1 PTH2

[0134] Step 5: We select the new best tree-path BT_PTH=T_PTH 11.

[0135] Step 6: There was a codeword selected before, thus go to step 10

[0136] Step 10: The first cumulative metric of the best tree-pathT_PTH11 is greater than the second cumulative metric of the worst pathfrom the stack PTH2 MP2<MP1+M11, thus we go to step 14.

[0137] Step 14: We reorder the stack. It stays the same here, whichmeans that the path PTH1 is better than the path PTH2.

[0138] Step 15, step 18: CPT=2, we return to step 3.

[0139] Step 3: the tree-path list L_PTH is erased totally. The new toptree-path T_PTH00 is MP1 with the node N00. CM_LPTH NSET MP1 N00 T_PTH00

[0140] Step 4: extension. CM_LPTH NSET MP1 + M10 N00 − N10 T_PTH10 MP1 +M11 N00 − N11 T_PTH11

[0141] Step 5, step 6: Then we go on with the new best tree-pathBT_PTH=T_PTH11 (N00-N11)

[0142] Step 7: it does not correspond to any codeword. We return to step4.

[0143] Step 4: extension CM_LPTH NSET MP1 + M10 N00 − N10 T_PTH10 MP1 +M11 + M20 N00 − N11 − N20 T_PTH20 MP1 + M11 + M21 N00 − N11 − N21T_PTH21

[0144] Step 5, step 6, and step 7: T_PTH21 (MP1+M1+M21, N00-N11-N21) isthe new best tree-path BT_PTH corresponding to no codeword. We return tostep 4.

[0145] extension CM_LPTH NSET MP1 + M10 N00 − N10 T_PTH10 MP1 + M11 +M20 N00 − N11 − N20 T_PTH20 MP1 + M11 + M21 + M32 N00 − N11 − N21 − N32T_PTH32 MP1 + M11 + M21 + M33 N00 − N11 − N21 − N33 T_PTH33

[0146] Step 5, step 6, and step 7: T_PTH32 (MP1+M1+M21+M32N00-N11-N21-N32) is the new best tree-path BT_PTH corresponding to thecodeword 110, i.e. to the symbol S4. We delete the best tree-pathBT_PTH=T_PTH32 in the tree-path list L_PTH.

[0147] Step 8, 9: delete the top path TOP_PTH in the stack STCK, then,in the stack STCK, we have CM_STCK CBITS STAT MP1 = MP1 ++ M11 + M21 +M32 7 S3 S1 S4 PTH1 MP2 4 S5 PTH2 CM_LPTH NSET MP1 + M10 N00 − N10T_PTH10 MP1 + M11 + M20 N00 − N11 − N20 T_PTH20 MP1 + M11 + M21 + M33N00 − N11 − N21 − N33 T_PTH33

[0148] Return to step 5: The new best tree-path is BT_PTH=T_PTH33.

[0149] Step 6, Step 10: The new first cumulative metric MP1+M11+M21+M33exceeds the worst second cumulative metric in the stack STCK, which isMP2, hence we go to step 14.

[0150] Step 14: we reorder the stack. Here, it stays the same. CM_STCKCBITS STAT MP1 = MP1 + M11 + M21 + M32 7 S3 S1 S4 PTH1 MP2 1 S1 PTH2

[0151] Step 15: The top path's cumulative bits CBITS in the stack STCKis equal to the length of the received sequence L_SQ, which is 7, thuswe go to step 16.

[0152] Step 16: a priori conditions: the number of symbols S is equal tothe number of symbols within the emitted sequence SQs, which is 3.Hence, we stop and output the top path TOP_PTH=S3, S1, S4, which is thesolution to the received sequence SQr=0.8−0.9−0.8−1.11.2−1.3.

[0153] IV) Performances.

[0154]FIG. 6, FIG. 7 and FIG. 8 show performances of the methodaccording to the invention compared with other methods for sourcedecoding of variable-length codeword sequences. The following methodperformances are illustrated:

[0155] hard VLC decoding “HARD” (in diamonds),

[0156] new symbol trellis algorithm “TRELLIS” (in circles) based on theDemir and Sayoud algorithm referenced “Joint Source Channel coding forvariable length codes” In Proceedings of Data Compression ConferenceDCC'98, pages 139-148, Snowbird, Utah, USA, Mar. 30-Apr. 1 1998 with theuse of formula [1] for the metric computation,

[0157] VLC stack algorithm proposed by Buttigieg “VLC-STACK” (intriangles up) described as the prior art (reference “variable-lengtherror-correcting codes” PhD thesis, University of Manchester, UK 1995),and

[0158] Method according to the invention “TREE-VLC-STACK”(in trianglesleft).

[0159] The hard VLC method is the method that consists of decoding thereceived sequence SQr bit by bit using prefix properties of VLC codes.Prefix properties mean that one codeword cannot be the start of anothercodeword.

[0160] The other methods are soft VLC decoding methods.

[0161] All the graphs of FIG. 6, FIG. 7, and FIG. 8 show the performanceby simulations, in terms of Packet Error Rate PER versus signal to noiseratio Eb/N0, a packet corresponding to a codeword sequence SQ. Note thatthe computation of signal-to-noise ratio is well-known to those skilledin the art. In other words, we calculate a performance versus a cost.The performance shows whether a codeword sequence has been correctlydecoded, and the cost shows how much power (energy/noise) has been usedto send the bits of a codeword sequence SQ. Then, depending on the errorwe accept to have and/or the power we want to use, we select the bestsolution. The optimal method and the hard method bound all performances.

[0162] Simulation characteristics are the following.

[0163] Codewords are transmitted in packets of 100,

[0164] Symbols are generated and VLC encoded with a given VLC table,

[0165] The channel noise is additive white and Gaussian,

[0166] A maximum number of survival paths used in the soft decodingmethods, said maximum number being set to 10.

[0167]FIG. 6 presents simulation results with a 26 codeword tableintroduced by Bauer and Haugenauer (references “symbol by symbol MAPdecoding of variable length codes” in Proceedings of third ITGConference on Source and Channel Coding CSCC00, pages 111-116, Munich,Germany, January 2000).

[0168]FIG. 7 presents simulation results with a 208 codeword tabledefined by the MPEG4 Standard (references Rob Koenen “Overview of theMEPEG4 Standard” ISO/IEC JTC1/SC29/WG11 N3156, Internationalorganization for standardization,http://drogo.cselt.stet.it/mpeg/standards/mpeg-4/Mpeg-4.htm, March2000).

[0169]FIG. 8 presents simulation results with a 1023 codeword UVLC tableof maximum length 19 associated with a H.26L standard (references GisleBjontegaard, “H.26L Test Model Long Term Number 6” draft 0, ITU,Telecommunication Standardization Sector Study Group 16,http://standard.pictel.com/ftp/video-site/h26L/tml6d0.doc, March 2001).

[0170] These simulations show that all the soft decoding methodsconcerned, achieve nearly identical performances in terms of PER. Hence,a selection criterion would be the decoding complexity, rapidity and therequired memory size.

[0171]FIG. 9 shows the performance of the TREE-VLC-STACK methodaccording to the invention in terms of complexity compared with theother methods concerned. The Y-axis represents a number of operations bysecond NBOP/SEC. The X-axis represents a number of bits by packetNBITS/PACK.

[0172] As can be seen, the method according to the invention is muchmore efficient in terms of decoding complexity.

[0173] Moreover, as shown in FIG. 10, the proposed TREE-VLC-STACK methodaccording to the invention is approximately 6 times less costly than theexisting VLC-STACK method.

[0174] V) Application.

[0175] The proposed VLC decoding method according to the invention ispreferably used for decoding noisy MPEG4 frames.

[0176] In the MPEG-4 video standard (references Rob Koenen. “Overview ofthe MPEG4 Standard”. Final Maui version ISO/IE JTC1/SC29/WG11 N3156,International Organization for Standardization,http://drogo.cselt.stet.it/mpeg/standards/mpeg-4/mpeg-4.htm, March 2000and Soares and Pereira “MPEG4: a flexible coding standard for theemerging mobile multimedia applications” in proceedings of IEEEInternational Symposium on Personal Indoor and Mobile RadioCommunications, Boston, USA, September 1998), an image scene isstructured as a composition of relevant objects. For each object, shape,motion and texture data are coded. Contrary to shape and motion data,the texture data is entirely VLC encoded. Moreover, MPEG-4 has defined adata partitioning mode, which reorders the data inside a packet, MPEG-4data being sent by packets. In this way, the shape and motion data isseparated from the texture data by a marker. Proposed soft decodingtechniques can then be successfully used over MPEG-4 texture partitionsin the data partitioning mode.

[0177] Texture coding is block-based: 8×8 blocks are encoded using theDiscrete Cosine Transform (DCT), quantized and mapped to bits byrun-length coding and variable length coding related to EVENTs. An EVENTis a combination of a last non-zero coefficient indication (if LAST isset to “0”, there are more non-zero coefficient in this block, if LASTis set to “1”, it means that this is the last non-zero coefficient inthis block), the number of successive zeros preceding a first codedcoefficient RUN and the non-zero value of a second coded coefficientLEVEL.

[0178] A possible EVENT can be represented by a VLC code. However, somepossible EVENTs have no VLC code to represent them. These EVENTs arestatistically rare. In order to encode these statistically rarecombinations, an Escape Coding method is used using an escape modecodeword ESC, this Escape Coding method is well known in the MPEG-4standard. It consists of three types of escape-mode codewords ESC.

[0179] Type 1: an escape mode codeword ESC followed by “0”.

[0180] Type 2: an escape mode codeword ESC followed by “10”.

[0181] Type 3: an escape mode codeword ESC followed by “11” and by afixed length code of length 21.

[0182] These three types are described in the reference by Rob Koenen,“Overview of the MPEG4 Standard”.

[0183] Due to the escape mode codeword, soft decoding algorithms cannotbe applied directly on the MPEG-4 texture partition. However, for thetwo first types (type 1 and type 2) of escape mode codewords ESC, aproposed solution is that we artificially include these escape modecodewords ESC with their respectively additive bits “0” and “10” in theVLC codeword table. Thus, the codeword table comprises escape modecodewords ESC, and these escape mode codewords ESC are then usedsimilarly as any other VLC codeword.

[0184] For the third type 3 of escape mode ESC, a proposed solution isas follows. At the 14^(th) step REORDER_STCK), just before reorderingthe stack STCK, we consider the issue of escape mode codeword of type 3:we calculate the metric of the escape mode codeword of type 3 asdescribed below. We add this metric to the second cumulative metricCM_STCK of the path PTH we are working on (the best path in the stack).Then, we compare it with the second cumulative metric CM_STCK of theworst path PTH in the stack STCK. If it is better than this CM_STCK, wereplace the worst path PTH in the stack STCK by the new path PTH formedby extending the best path in the stack STCK by the escape mode codewordESC followed by 11 and by the hard values of 21 following received bits.Note that this extended path is characterized by the above-mentionedcumulative metric and a cumulative number of bits CBITS equal to thecumulative number of bits CBITS of the top path concerned +30.

[0185] We go to step 14 in any case.

[0186] The metric of an escape mode codeword of type 3 followed by afixed length code at time t is as follows.${M\left( {}^{''}{{{ESC} + 11^{''}},{y\left\lbrack {t:{t + 8}} \right\rbrack}} \right)} + {\sum\limits_{i = 9}^{29}\left( {{{{y\left\lbrack {t + i} \right\rbrack} - {{sign}\left( {y\left\lbrack {t + i} \right\rbrack} \right)}}}^{2} - {\log \frac{1}{2}} + {\log \quad {P_{0}\left( {y\left\lbrack {t + i} \right\rbrack} \right)}}} \right.}$

[0187] Regarding the a priori conditions used in the proposed VLCdecoding algorithm, soft VLC decoding algorithms often use the a prioriknowledge of the number of symbols by sequence to make the estimation ofthe transmitted sequence more accurate. Unfortunately, in the standardMPEG4, the knowledge of the number of symbols contained in each texturepartition cannot be known from the MPEG-4 frame (except of course bycompletely and correctly decoding the frame). However, by decodingheaders and motion partition, one can know the number of blockscontained in the texture partition.

[0188] Therefore, for the MPEG-4 standard, in the proposed VLC decodingalgorithm according to the invention, we will use the a priori knowledgeof the number of blocks within a texture partition to perform thedecoding.

[0189] Indeed, it is easy to determine the number of blocks contained ina given sequence of codewords by counting the number of codewordscorresponding to a LAST parameter equal to 1. Thus, the knowledge of thenumber of blocks by partition is a priori information that can be usedas the number of symbols to select a likely sequence, in the sense thatit contains the exact number of blocks. Hence, in the 16^(th) step ofthe proposed VLC algorithm, we compare the number of blocks of thedecoded sequence with the number of blocks of the sent sequence SQs,which is known.

[0190] Note that if the a priori conditions are based on block criteria,we can gain time by not selecting two codewords of the same length whichcorrespond to the same LAST parameter value.

[0191] It is to be understood that the present invention is not limitedto the afore-mentioned embodiments and variations and modifications maybe made without departing from the spirit and scope of the invention asdefined in the appended claims. In this respect, the following closingremarks are made.

[0192] It is to be understood that the present invention is not limitedto the afore-mentioned MPEG4 application. It can be used within anyapplication using variable-length coding and which can support the costof said decoding. Typically, this can be used for instance in video,audio or text compression.

[0193] It is to be understood that the method according to the presentinvention is not limited to any implementation.

[0194] There are numerous ways of implementing functions of the methodaccording to the invention by means of items of hardware or software, orboth, provided that a single item of hardware or software can carry outseveral functions. It does not exclude that an assembly of items ofhardware or software or both carries out a function. For example, thetree-path extension step 4) can be combined with the selection of thenew best tree-path BT_PTH step 5), thus forming a single functionwithout modifying the method of source Decoding according to theinvention.

[0195] Said hardware or software items can be implemented in severalmanners, such as by means of wired electronic circuits or by means of anintegrated circuit that is suitably programmed. The integrated circuitmay be incorporated in a computer or in a decoder. The decoder comprisestree-path extension means adapted to perform the extension step 4), andselection means adapted to perform the selection step 5), as describedpreviously, said means being hardware or software items as stated above.

[0196] The integrated circuit comprises a set of instructions. Thus,said set of instructions contained, for example, in a computerprogramming memory or in a decoder memory may cause the computer or thedecoder to carry out the different steps of the VLC decoding method.

[0197] The set of instructions may be loaded into the programming memoryby reading a data carrier such as, for example, a disk. A serviceprovider may also make the set of instructions available via acommunication network such as, for example, the Internet.

[0198] Any reference sign in the following claims should not beconstrued as limiting the claim. It will be obvious that the use of theverb “to comprise” and its conjugations does not exclude the presence ofsteps or elements other than those defined in any claim. The article “a”or “an” preceding an element or step does not exclude the presence of aplurality of such elements or steps.

1. A method of source decoding a variable-length codeword sequence(SQr), said source decoding being based on a codeword table,characterized in that it comprises the steps of: creating a treeassociated with said codeword table, said tree comprising tree-paths(T_PTH), a tree-path (T_PTH) comprising a plurality of branches (B),decoding a received sequence (SQr), said step comprising the sub-stepsof: extending the best tree-paths (BT_PTH) from a node (N) in the treeby computing first cumulative metrics (CM_LPTH) of the succeedingbranches (B) coming from said node (N), selecting the codewords (CWDi)corresponding to the best tree-paths (BT_PTH), and saving correspondingdata in paths (PTH), the corresponding data comprising a secondcumulative metric (CM_STCK), reordering the saved paths (PTH) inaccordance with their second cumulative metrics (CM_STCK), testing apriori conditions on top path (TOP_PTH), and if they are verified,outputting said top path (TOP_PTH), or otherwise returning to theextension sub-step.
 2. A method as claimed in claim 1, characterized inthat each codeword (CWDi) has a length (LTHi), and that the treecomprises a number of levels equal to the maximum codeword length (LTHi)defined in the codeword table.
 3. A method as claimed in claim 1,characterized in that the extension sub-step comprises a stop metriccomputation conditions test, such that, if said conditions are verified,the extension is stopped and is followed by the sub-step of reorderingpaths.
 4. A method as claimed in claim 3, characterized in that the stopmetric computation conditions test is based on a comparison of the firstcumulative metric (CM_LPTH) of the best tree-path (BT_PTH) with theworst saved path's second cumulative metric (CM_STCK).
 5. A method asclaimed in claim 1, characterized in that, if a priori conditions arebased on symbols criteria, the selection sub-step is adapted to selectonly a codeword (CDWi) which has a length (LTHi) different from allpreviously selected codeword lengths within a decoding step.
 6. A methodas claimed in claim 1, wherein the decoding step further comprises asub-step of testing end conditions on the top path (TOP_PTH) beforetesting the a priori conditions, such that, if said top path (TOP_PTH)verifies end conditions, the sub-step of testing the a priori conditionsis performed, or otherwise, a sub-step of testing stop decodingconditions is performed, and if said stop decoding conditions are notverified, a return to the extension step takes place.
 7. A method asclaimed in claim 6, characterized in that the stop decoding conditionsare based on an incrementation of a decoding step counter (CPT) and on acomparison of said counter (CPT) with a set threshold (TH), such that ifsaid counter (CPT) exceeds said threshold (TH), the decoding is stopped.8. A method as claimed in claim 6, characterized in that thecorresponding data in paths (PTH) further comprise a cumulative numberof bits (CBITS), and that the end conditions are based on a comparisonof the top path's cumulative number of bits (CBITS) with the length(L_SQ) of the received codeword sequence (SQr).
 9. A method as claimedin claim 1, characterized in that the codeword table comprises escapemode codewords (ESC).
 10. A computer program product for a decoder,comprising a set of instructions, which, when loaded into said decoder,causes the decoder to carry out the method as claimed in claim
 1. 11. Acomputer program product for a computer, comprising a set ofinstructions, which, when loaded into said computer, causes the computerto carry out the method as claimed in claim
 1. 12. A decoder for sourcedecoding variable-length codeword sequences, said source decoding beingbased on an associated codeword table, characterized in that saiddecoder comprises: tree creation means adapted to create a treeassociated with the codeword table, said tree comprising tree-paths(T_PTH), a tree-path (T_PTH) comprising a plurality of branches (B),sequence decoding means adapted to decode a received sequence (SQr),said decoding means comprising: best tree-path extension means adaptedto extend the best tree-paths (BT_PTH) from a node (N) in the tree bycomputing first cumulative metrics (CM_LPTH) of the succeeding branches(B) coming from said node (N), codeword selection means adapted toselect the codewords (CWDi) corresponding to the best tree-paths(BT_PTH), and to save corresponding data in paths (PTH), thecorresponding data comprising a second cumulative metric (CM_STCK),paths reordering means adapted to reorder the saved paths (PTH) inaccordance with their second cumulative metrics (CM_STCK), and, a prioricondition test means adapted to test a priori conditions on top path(TOP_PTH), and if they are verified, to output said top path (TOP_PTH).